package org.tech4j.captcha.graphical.model;

import org.apache.commons.lang3.function.TriFunction;
import org.tech4j.captcha.api.model.CaptchaEntity;
import org.tech4j.captcha.api.model.CaptchaResponse;
import org.tech4j.captcha.graphical.config.CaptchaGraphicalConfig;

import java.util.concurrent.TimeUnit;
import java.util.function.BiFunction;
import java.util.function.Supplier;

/**
 * @program: tech4j
 * @description:
 * @author: YuKai Fan
 * @create: 2025/3/4 17:15
 **/
public class CheckCaptchaEntity implements CaptchaEntity {

    private String key;

    private String storeType;


    private String pointValue;

    private TriFunction<CaptchaGraphicalConfig, CheckCaptchaEntity, String, CaptchaResponse> captchaCheck;

    private Long expireAt;

    private TimeUnit timeUnit;

    @Override
    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    @Override
    public String getStoreType() {
        return storeType;
    }

    public void setStoreType(String storeType) {
        this.storeType = storeType;
    }

    @Override
    public Long getExpireAt() {
        return expireAt;
    }

    public void setExpireAt(Long expireAt) {
        this.expireAt = expireAt;
    }

    @Override
    public TimeUnit getTimeUnit() {
        return timeUnit;
    }

    public void setTimeUnit(TimeUnit timeUnit) {
        this.timeUnit = timeUnit;
    }

    @Override
    public <T> Supplier<T> getCaptcha() {
        return () -> null;
    }

    public TriFunction<CaptchaGraphicalConfig, CheckCaptchaEntity, String, CaptchaResponse> getCaptchaCheck() {
        return captchaCheck;
    }

    public void setCaptchaCheck(TriFunction<CaptchaGraphicalConfig, CheckCaptchaEntity, String, CaptchaResponse> captchaCheck) {
        this.captchaCheck = captchaCheck;
    }

    public String getPointValue() {
        return pointValue;
    }

    public void setPointValue(String pointValue) {
        this.pointValue = pointValue;
    }
}
